package com.ht.medicaltreatment.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.ht.medicaltreatment.R
import com.ht.medicaltreatment.base.BaseUrl
import com.ht.medicaltreatment.bean.ShenQingProjectConsumable
import com.ht.medicaltreatment.utils.loadImage

class ApplySubjectRecordAdapter : BaseQuickAdapter<ShenQingProjectConsumable,BaseViewHolder>(R.layout.item_subject_record_layout){

    init {
        addChildClickViewIds(R.id.tvCount)
    }

    override fun convert(holder: BaseViewHolder, item: ShenQingProjectConsumable) {
        holder.setText(R.id.tvXingHao,"型号："+item.consumable.model)
        holder.setText(R.id.tvGuiGe,"规格："+item.consumable.specification)
        holder.setText(R.id.tvPinPai,"品牌："+item.consumable.brand)
        holder.setText(R.id.tvCaiZhi,"材质："+item.consumable.material)
        holder.setText(R.id.tvCount,"${item.useNumber}")
        holder.loadImage(R.id.imgIcon,BaseUrl.baseUrl()+item.consumable.picturePath)
    }
}
